{
    "bomFormat": "CycloneDX",
    "specVersion": "1.6",
    "serialNumber": "${serialNumber}",
    "version": 1,
    "metadata": {
        "lifecycles": {
            "phase": "pre-build"
        },
        "timestamp": "${timestamp}",
        "components": {
            "type": "application",
            "supplier": {
                "name": "苏州棱镜七彩信息科技有限公司"
            },
            "group": "com.ljqc",
            "name": "sbom-generate-tool",
            "version": "1.0.0",
            "description": "sbom生成工具",
            "scope": "required",
            "licenses": [
                {
                    "id": "MulanPSL-2.0",
                    "name": "Mulan Permissive Software License 2.0",
                    "url": "https://spdx.org/licenses/MulanPSL-2.0.html"
                }
            ]
        }
    },
    "components": [
        <#list packages as package>
        {
            "type": "library",
            "bom-ref": "${package.id}",
            "name": "${package.name}",
            "version": "${package.version}",
            <#if package.description?? && package.description != "NOASSERTION">
            "description": "${package.description}",
            </#if>
            <#if package.externalRef?? && package.externalRef != "NOASSERTION">
            "purl": "pkg:${package.externalRef}",
            </#if>
            <#if package.checksum?? && package.checksum != "NOASSERTION">
            "hashes": [
                {
                    "alg": "MD5",
                    "content": "${package.checksum}"
                }
            ],
            </#if>
            <#if package.licenseConcluded?? && package.licenseConcluded != "NOASSERTION">
            "licenses": [
                {
                    "id": "${package.licenseConcluded}"
                }
            ]
            </#if>
        }<#if package_has_next>,</#if>
        </#list>
    ],
    "dependencies": [
        <#list dependencies as dep>
        {
            "ref": "${dep.parentId}",
            "dependsOn": [
            <#list dep.names as name>
                "${name}"<#if name_has_next>,</#if>
            </#list>
            ]
        }<#if dep_has_next>,</#if>
        </#list>
    ]
}